String.prototype.trim = function () {
    return this.replace(/(^\s*)|(\s*$)/g, "");
}

String.prototype.replaceAll = function (s1, s2) {
    return this.replace(new RegExp(s1, "gm"), s2);
};

String.prototype.json = function () {
    return eval('(' + this + ')');
};

String.prototype.isphone = function () {
    var reg = /^[1][3,4,5,7,8][0-9]{9}$/;
    if (reg.test(this)) {
        return true;
    } else {
        return false;
    }
};

String.prototype.isemail = function () {
    var reg = /^[a-zA-Z0-9_\.-]+@[a-zA-Z0-9\.-]+\.[a-zA-z\.]{2,6}$/;
    if (reg.test(this)) {
        return true;
    } else {
        return false;
    }
};

String.prototype.fnum = function () {
    return this >= 10000 ? this / 10000 + '万' : this;
};

//添加不重复数据，成功添加返回true
Array.prototype.push2 = function (val) {
    if (this.indexOf(val) == -1) {
        this.push(val);
        return true;
    } else {
        return false;
    }

};
//删除元素
Array.prototype.del2 = function (val) {
    var index = this.indexOf(val);
    if (index == -1) {
        return false
    } else {
        this.splice(index, 1);
        return true;
    }
};

// 对Date的扩展，将 Date 转化为指定格式的String
// 月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q) 可以用 1-2 个占位符， 
// 年(y)可以用 1-4 个占位符，毫秒(S)只能用 1 个占位符(是 1-3 位的数字) 
// 例子： 
// (new Date()).Format("yyyy-MM-dd hh:mm:ss.S") ==> 2006-07-02 08:09:04.423 
// (new Date()).Format("yyyy-M-d h:m:s.S")      ==> 2006-7-2 8:9:4.18 
Date.prototype.Format = function (fmt) {
    var o = {
        "M+": this.getMonth() + 1, //月份 
        "d+": this.getDate(), //日 
        "H+": this.getHours(), //小时 
        "m+": this.getMinutes(), //分 
        "s+": this.getSeconds(), //秒 
        "q+": Math.floor((this.getMonth() + 3) / 3), //季度 
        "S": this.getMilliseconds() //毫秒 
    };
    if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
    for (var k in o)
        if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
    return fmt;
};

function bsize(size, digits) {
    if (size > 0) {
        var unit = Array('', 'K', 'M', 'G', 'T', 'P');
        var i = Math.floor(Math.log(size) / Math.log(1024));
        var n = unit.length;
        if (i >= n) {
            i = n - 1;
        }
        return Math.round(size / Math.pow(1024, i), digits) + ' ' + unit[i] + 'B';
    } else {
        return 0;
    }
};

//2016.01.20
//checkbox
(function (checkbox) {
    checkbox.each(function () {
        var $this = $(this);
        if ($this.hasClass("disable"))
            return;
        var set = $this.attr("checkbox").json();
        var ops = $.extend({}, {
            key: "ID",
            val: 0,
            url: ""
        }, set);

        if (ops.url == "") {
            $this.append('<input type="hidden" id="' + ops.key + '" name="' + ops.key + '" value="' + ops.val + '">');
            ops.val == 1 && $this.addClass("checked");

            var $input = $this.find("input");
            $this.click(function () {
                var group = $this.attr("group");
                if (group && $input.val() == 0) {
                    var groups = $("a[checkbox][group='" + group + "']");
                    groups.each(function () {
                        //应该修改ops.val
                        $(this).removeClass("checked");
                        $(this).find("input").val(0);
                    });
                }

                ops.val = +!ops.val;
                $this.toggleClass("checked");
                $input.val(+!ops.val);
            });
        } else {
            ops.val == 1 && $this.addClass("checked");
            $this.click(function () {

                var group = $this.attr("group");
                if (group) {
                    var groups = $("a[checkbox][group='" + group + "']");
                    groups.each(function () {
                        $(this).removeClass("checked");
                        ops.val = 0;
                    });
                }

                ops.val = +!ops.val;
                $this.toggleClass("checked");
                $.ajax({
                    url: ops.url,
                    type: "POST",
                    data: {
                        key: ops.key,
                        val: ops.val
                    },
                    success: function (data) {
                        if (!data) {
                            $this.toggleClass("checked"); //失败还原
                        }
                    }
                });
            });
        }
    });
})($("a[checkbox]"));

//ui-checkbox
$(document).delegate(".ui-checkbox", "click", function () {
    var $this = $(this);
    if ($this.hasClass("disable"))
        return;
    var $input = $this.find("input");
    if ($this.hasClass("checked")) {
        $this.removeClass("checked");
        $input.val(0);
    } else {
        var group = $this.attr("group");
        if (group) {
            var groups = $(".ui-checkbox[group='" + group + "']");
            groups.each(function () {
                $(this).find("input").val(0);
                $(this).removeClass("checked");
            });
        }

        var group2 = $this.attr("group2");
        if (group2) {
            var groups2 = $(".ui-checkbox[group2!='" + group2 + "']");
            groups2.each(function () {
                $(this).find("input").val(0);
                $(this).removeClass("checked");
            });
        }

        $this.addClass("checked");
        $input.val(1);
    }
});

$(document).delegate("i.checkbox", "click", function () {
    var $this = $(this);
    if ($this.hasClass("disable"))
        return;
    $this.toggleClass("checked");
});

//ui-dropdown
$(document).on("click", ".ui-dropdown", function (e) {
    if ($(this).hasClass("disable"))
        return;

    if ($(this).hasClass("disable"))
        return;
    $(".ui-dropdown ul").hide();
    $(this).addClass("active");
    $(this).next().addClass("active"); //如果是dropdown-search
    $(this).find("ul").toggle();
    return false;
});

$(document).on("click", ".ui-dropdown ul", function (e) {
    e.stopPropagation();
    var $li = $(e.target);
    if ($li.prop("tagName") != "LI") return;
    $(this).prev().html($li.text());
    $(this).next().val($li.attr("data-val"));
    $(this).hide();
});

//ui-search
$(document).on("click", ".ui-search", function (e) {
    e.stopPropagation();
    $(this).addClass("active");
    $(this).prev().addClass("active"); //如果是dropdown-search
});

$(document).on("click", "body", function () {
    $(".ui-dropdown,.ui-search").removeClass("active"); //如果是dropdown-search
    $(".ui-dropdown ul").hide();
});

$(document).on("mouseenter", ".user-tip-p", function () {
    $this = $(this).find(".user-tip");
    setTimeout(function () {
        $this.show();
    }, 500);

}).on("mouseleave", ".user-tip-p", function () {
    $this = $(this).find(".user-tip");
    setTimeout(function () {
        $this.hide();
    }, 500);
});

$(document).delegate(".ui-radioplan > i", "click", function () {

    var $this = $(this);
    var $parent = $this.parent();
    var $input = $parent.find("input");
    if ($this.hasClass("disable") || $parent.hasClass("disable"))
        return;
    if ($this.hasClass("checked")) {
        $this.removeClass("checked");
        $input.val(0);
    } else {
        $parent.find("i").each(function () {
            $(this).removeClass("checked");
        });
        $this.addClass("checked");
        $input.val($this.attr("data-id"));
    }
});


//admin : banner and content-left
$(document).delegate(".banner-module a,.ul-body a", "click", function () {
    $(this).parent().parent().find("a").removeClass("active");
    $(this).addClass("active");
});

//ui-move
$(document).on('mousedown', '.ui-move', function (e) {
    e.stopPropagation();
    var $this = $(this).parent();
    var box_postion = $this.position();
    var xstart = e.pageX;
    var ystart = e.pageY;

    $("body").on({
        'selectstart': function () {
            return false;
        },
        'mousemove': function (e) {
            var xend = e.pageX,
                yend = e.pageY;

            var w_height = $(window).height(),
                w_width = $(window).width();
            var box_height = $this.height(),
                box_width = $this.width();

            var new_top = box_postion.top + yend - ystart,
                new_left = box_postion.left + xend - xstart;

            if (new_top >= 0 && new_top <= w_height - box_height) {
                $this.css({
                    top: new_top
                });
            }
            if (new_left >= 0 && new_left <= w_width - box_width) {
                $this.css({
                    left: new_left
                });
            }
        },
        'mouseup': function (e) {
            $(this).off('mousemove').off('mouseup').off('selectstart');
        },
        'mouseleave': function (e) {
            $(this).off('mousemove').off('mouseup').off('selectstart');
        }
    });
});

//表单验证
$(document).on("change", "[data-valid]", function (e) {
    e.preventDefault();

    var $this = $(this);
    if ($this.hasClass("disable"))
        return;
    $this.removeClass("error");

    var error = '';
    var val = $this.val();
    console.log($this);
    $this.next("span").length && $this.next("span").text(error);

    var must = $this.attr("data-must");
    if (must && val == "") {
        $this.addClass("error");
        if (must != "#") {
            $this.next("span").length ? $this.next("span").text(must) : $this.after("<span>" + must + "</span>");
        }
        return;
    }

    var length = $this.attr("data-length");
    if (length && val && (val.length < length.split("-")[0] || val.length > length.split("-")[1])) {
        $this.addClass("error");
        error = $this.attr("data-length-msg") || ("需要" + length + "个字符");
        $this.next("span").length ? $this.next("span").text(error) : $this.after("<span>" + error + "</span>");
        return;
    }

    var min = $this.attr("data-min");
    if (min && val && (Number(val) < Number(min))) {
        $this.addClass("error");
        error = $this.attr("data-min-msg") || ("数值必须大于" + min);
        $this.next("span").length ? $this.next("span").text(error) : $this.after("<span>" + error + "</span>");
        return;
    }

    var max = $this.attr("data-max");
    if (max && val && (Number(val) > Number(max))) {
        $this.addClass("error");
        error = $this.attr("data-max-msg") || ("数值必须小于" + max);
        $this.next("span").length ? $this.next("span").text(error) : $this.after("<span>" + error + "</span>");
        return;
    }

    var reg = $this.attr("data-reg");
    if (reg && val && !(new RegExp(reg)).test(val)) {
        $this.addClass("error");
        error = $this.attr("data-reg-msg") || "请输入正确的格式";
        $this.next("span").length ? $this.next("span").text(error) : $this.after("<span>" + error + "</span>");
        return;
    }

    var reg1 = $this.attr("data-reg1");
    if (reg1 && val && !(new RegExp(reg1)).test(val)) {
        $this.addClass("error");
        error = $this.attr("data-reg-msg1") || "请输入正确的格式";
        $this.next("span").length ? $this.next("span").text(error) : $this.after("<span>" + error + "</span>");
        return;
    }

    var reg2 = $this.attr("data-reg2");
    if (reg2 && val && !(new RegExp(reg2)).test(val)) {
        $this.addClass("error");
        error = $this.attr("data-reg-msg2") || "请输入正确的格式";
        $this.next("span").length ? $this.next("span").text(error) : $this.after("<span>" + error + "</span>");
        return;
    }

    var reg3 = $this.attr("data-reg3");
    if (reg3 && val && !(new RegExp(reg3)).test(val)) {
        $this.addClass("error");
        error = $this.attr("data-reg-msg3") || "请输入正确的格式";
        $this.next("span").length ? $this.next("span").text(error) : $this.after("<span>" + error + "</span>");
        return;
    }

    var equ = $this.attr("data-equ");
    if (equ && val && $(equ).val() !== val) {
        $this.addClass("error");
        error = $this.attr("data-equ-msg") || "密码不一致";
        $this.next("span").length ? $this.next("span").text(error) : $this.after("<span>" + error + "</span>");
        return;
    }

    var sever = $this.attr("data-sever");
    var $type = "POST";
    var $username = $this.parent().find(".inout1");
    var username = $username.val();
    if(($this.attr("name")=='yzm') && (sever=="/yyzm")) {

        sever = sever + "/"+username+"/"+val;
        $type = "GET";
    }
    //判断是否邮箱//统一//20250114


    console.log("sever"+sever);
    if (sever && val) {
        $.ajax({
            url: sever,
            type: $type,
            data: {
                data: val
            },
            async: false,
            success: function (data) {
                if (data == true) {
                    $this.addClass("ok").removeClass("error");
                } else {
                    $this.addClass("error").removeClass("ok");
                    error = $this.attr("data-sever-msg") || "验证失败";
                    $this.next("span").length ? $this.next("span").text(error) : $this.after("<span>" + error + "</span>");
                }
            }
        });
    }
});

//Modal
$(document).on("click", ".ui-modal-header i,.ui-modal-footer span", function () {
    HideModal();
});

$(document).on("click", "a[tip]", function (e) {
    e.preventDefault();
    var $this = $(this);
    if ($this.hasClass("disable"))
        return;
    Message($this.attr("tip"));
});

//2017.10.03 模拟A连接 1.A连接 2.加提示的A连接
//<a goto='/admin/logout'>登录</a>
//<a goto='/admin/logout' tip='确认退出'>退出</a>
$(document).on("click", "a[goto]", function (e) {
    e.preventDefault();
    var $this = $(this);
    if ($this.hasClass("disable"))
        return;
    var ops = {
        href: $this.attr("goto"),
        tip: $this.attr("tip")
    };
    if (ops.href) {
        if (ops.tip) {
            Dialog(ops.tip, "", function () {
                HideModal();
                window.location.href = '/' + ops.href;
            });
        } else {
            window.location.href = '/' + ops.href;
        }
    }
});

//2016.01.21 模拟submitbtton 1.提交表单并跳转 2.加提示
//<a submit='#Form_ID'>注册</a>
//<a submit='#Form_ID' tip='确认提交?'>注册</a>
$(document).on("click", "a[submit]", function (e) {
    e.preventDefault();
    var $this = $(this);
    if ($this.hasClass("disable"))
        return;
    var ops = {
        submit: $this.attr("submit"),
        tip: $this.attr("tip")
    };
    if (ops.submit) {
        var $form = $(ops.submit);
        $form.find("[data-valid]").trigger("change");
        if ($form.find(".error").length !== 0)
            return;
        if (ops.tip) {
            Dialog(ops.tip, "", function () {
                $form.submit();
            });
        } else {
            $form.submit();
        }
    }
});

//2017.10.03 提交url 例如删除
//<a submit-url="{url:'/amdin/del',tip:'确认提交',click:'',back:['删除成功','删除失败']}">保存</a>
$(document).on("click", "a[submit-url]", function (e) {
    e.preventDefault();
    var $this = $(this);
    if ($this.hasClass("disable") || $this.hasClass("doing"))
        return;
    $this.addClass("doing");
    var ops = eval("(" + $this.attr("submit-url") + ")");
    SubmitUrl($this, ops);
});

//2016.05.28 平面提交form  保存
//<a submit-form="{form:'#MyForm_ID',tip:'确认提交',click:"",back:['保存成功','保存失败']}">保存</a>
$(document).on("click", "a[submit-form]", function (e) {
    e.preventDefault();
    var $this = $(this);
    if ($this.hasClass("disable") || $this.hasClass("doing"))
        return;
    $this.addClass("doing");
    var ops = eval("(" + $this.attr("submit-form") + ")");
    SubmitForm($this, ops);
});

//2017.10.03 模式提交form 添加 编辑
//<a modal-form="{title:'新增用户',body:'/admin/edituser/',back:['新增成功', '新增失败']}">新增</a> 
$(document).on("click", "a[modal-form]", function (e) {
    e.preventDefault();
    var $this = $(this);
    if ($this.hasClass("disable"))
        return;
    var ops = eval("(" + $(this).attr("modal-form") + ")");
    ModalForm(ops);
});

//2018.11.24 显示信息
//<a modal-dialog="{title:'选择文档',body:'topic/select.html',click:select_docs}">新增</a> 
$(document).on("click", "a[modal-dialog]", function (e) {
    e.preventDefault();
    var $this = $(this);
    if ($this.hasClass("disable"))
        return;
    var ops = eval("(" + $(this).attr("modal-dialog") + ")");
    ops.body = $.ajax({
        url: ops.body,
        type: "get",
        async: false
    }).responseText;
    Dialog(ops.body, ops.title, ops.click);
});

//提交url 删除
function SubmitUrl(who, ops) {
    var ops = $.extend({}, {
        url: "",
        tip: "",
        click: null,
        back: ["已删除", "删除失败"]
    }, ops);

    if (ops.url) {
        if (ops.tip) {
            Dialog(ops.tip, "", function () {
                HideModal();
                SubmitUrlSub(who, ops);
            }, function () {
                who.removeClass("doing");
            });
        } else {
            SubmitUrlSub(who, ops);
        }
    }
}

function SubmitUrlSub(who, ops) {
    if (ops.click && !ops.click()) {
        who.removeClass("doing");
        return;
    }
    $.ajax({
        url: ops.url,
        type: "post",
        success: function (data) {
            if (ops.back) {
                if (data == "-1") {
                    ShowTip(ops.back[1] ? ops.back[1] : data);
                } else {
                    ShowTip(ops.back[0] ? ops.back[0] : data);
                }
            }
        },
        error: function (XMLHttpRequest, textStatus, errorThrown) {
            ShowTip(XMLHttpRequest.status + "," + textStatus + "," + errorThrown);
        },
        complete: function () {
            who.removeClass("doing");
        }
    });
}

//提交form 保存
function SubmitForm(who, ops) {
    var ops = $.extend({}, {
        form: "",
        tip: "",
        click: null,
        back: ["已保存", "保存失败"]
    }, ops);

    var $form = $(ops.form);
    if ($form) {
        $form.find("[data-valid]").trigger("change");
        if ($form.find(".error").length !== 0) {
            who.removeClass("doing");
            return;
        }
        if (ops.tip) {
            Dialog(ops.tip, "", function () {
                HideModal();
                SubmitFormSub(who, ops);
            });
        } else {
            SubmitFormSub(who, ops);
        }
    }
}

function SubmitFormSub(who, ops) {
    if (ops.click && !ops.click()) {
        who.removeClass("doing");
        return;
    }
    var $form = $(ops.form);
    $.ajax({
        url: $form.attr("action"),
        type: "post",
        data: $form.serialize(),
        success: function (data) {
            if (ops.back) {
                if (data == "-1") {
                    ShowTip(ops.back[1]);
                } else {
                    ShowTip(ops.back[0]);
                }
            }
        },
        error: function (XMLHttpRequest, textStatus, errorThrown) {
            ShowTip(XMLHttpRequest.status + "," + textStatus + "," + errorThrown);
        },
        complete: function () {
            who.removeClass("doing");
        }
    });
}

//modal-form  [新增,编辑]
function ModalForm(ops) {
    var ops = $.extend({}, {
        title: "提示",
        body: "",
        click: null,
        back: ["保存成功", "保存失败"]
    }, ops);

    ops.body = $.ajax({
        url: ops.body,
        type: "get",
        async: false
    }).responseText;

    Dialog(ops.body, ops.title, function (e) {
        e.preventDefault();
        var $this = $(this);
        if ($this.hasClass("doing"))
            return;
        $this.addClass("doing");

        var $form = $(".ui-modal-body").find("form");
        if ($form.length > 0) {
            $form.find("[data-valid]").trigger("change");
            if ($form.find(".error").length !== 0) {
                $this.removeClass("doing");
                return;
            }
            if (ops.click && !ops.click()) {
                $this.removeClass("doing");
                return;
            }
            $.ajax({
                url: $form.attr("action"),
                type: "post",
                data: $form.serialize(),
                success: function (data) {
                    HideModal();
                    if (ops.back) {
                        if (data) {
                            ShowTip(ops.back[0]);
                        } else {
                            ShowTip(ops.back[1]);
                        }
                    }
                },
                error: function (XMLHttpRequest, textStatus, errorThrown) {
                    ShowTip(XMLHttpRequest.status + "," + textStatus + "," + errorThrown);
                },
                complete: function () {
                    $this.removeClass("doing");
                }
            });
        } else {
            HideModal();
        }
    });
}

//填充信息并显示1个按钮
function Message(body, title, fun) {
    $(".ui-modal-title").text(title || "提示");
    $(".ui-modal-body").html(body);
    $(".ui-modal-footer").html('<span class="ui-btn ui-btn-blue" modal>确定</span>');
    fun && $(".ui-modal-footer span").on("click", fun);
    ShowModal();
}

// 填充信息并显示2个按钮 点击确认按钮执行fun1 点击取消按钮执行fun2
function Dialog(body, title, fun1, fun2) {
    $(".ui-modal-title").text(title || "提示");
    $(".ui-modal-body").html(body);
    $(".ui-modal-footer").html('<a class="ui-btn ui-btn-blue">确定</a><span class="ui-btn">取消</span>');
    fun1 && $(".ui-modal-footer a").on("click", fun1);
    fun2 && $(".ui-modal-footer span").on("click", fun2);
    ShowModal();
}

// 填充信息HTML
function Dialog2(body) {
    $(".ui-modal").html(body);
    ShowModal();
}

//弹出登录
function login_f() {
    $.get("/login_f.htm", function (html) {
        $(".ui-modal").html(html);
        ShowModal();
    });
}

//显示Modal 私有
function ShowModal() {
    var $modal = $(".ui-modal");
    clearTimeout(t);
    $(".ui-modal-cover").addClass("in");
    $modal.removeClass("fadeOutUp").addClass("fadeInDown").css({
        "left": ($(window).width() - $modal.width()) / 2,
        "top": ($(window).height() - $modal.height() * 1.2) / 2,
        "display": "block"
    });
}

//隐藏Modal 私有
var t;

function HideModal() {
    $(".ui-modal").removeClass("fadeInDown").addClass("fadeOutUp");
    t = setTimeout(function () {
        $(".ui-modal").hide();
    }, 500);
    $(".ui-modal-cover").removeClass("in");
    $(".ui-modal").html('<div class="ui-modal-header ui-move"><div class="ui-modal-title"></div><i>&times;</i></div><div class="ui-modal-body"></div><div class="ui-modal-footer"><span class="ui-btn">取消</span><a class="ui-btn ui-btn-blue" modal>确定</a></div>');
}

//私有
function ShowTip(tip, reload=true) {//修复删除操作后的页面修复
    var $tip = $(".ui-tip");
    $tip.text(tip);
    $tip.removeClass("fadeOutUp").addClass("fadeInDown").css({
        "left": ($(window).width() - $tip.width()) / 2,
        "display": "block"
    });
    setTimeout(function () {
        $(".ui-tip").removeClass("fadeInDown").addClass("fadeOutUp");
        if (reload) location.reload();
    }, 1500);
}

//分页
function CreatPage(PageCurrent, PageSize, Total, url) {

    PageCurrent = parseInt(PageCurrent);
    PageSize = parseInt(PageSize);
    Total = parseInt(Total);
    if (PageCurrent <= 0 && PageSize <= 0 || Total <= 0 || url == "") {
        return "";
    }
    var totalpage = Math.ceil(Total / PageSize);

    if (PageCurrent < 1)
        PageCurrent = 1;
    if (PageCurrent > totalpage)
        PageCurrent = totalpage;

    var page = '<div class="ui-page">';
    if (PageCurrent > 1) {
        page += '<a href="' + url.replace("{PageCurrent}", PageCurrent - 1) + '"><</a>';
    }
    if (PageCurrent > 6) {
        page += '<a href="' + url.replace("{PageCurrent}", 1) + '">1</a><span>...</span>';
    }
    var mon = 5 - PageCurrent > 0 ? 5 - PageCurrent : 0;
    var i;
    for (i = PageCurrent - 4; i <= +PageCurrent + 5 + mon; i++) {
        if (i >= 1 && i < PageCurrent) {
            page += '<a href="' + url.replace("{PageCurrent}", i) + '">' + i + '</a>';
        }
        if (i == PageCurrent) {
            page += '<span class="active">' + PageCurrent + '</span>';
        }
        if (i > PageCurrent && i <= totalpage) {
            page += '<a href="' + url.replace("{PageCurrent}", i) + '">' + i + '</a>';
        }
    }
    if (totalpage - PageCurrent > 6 && i != totalpage + 1) {
        page += '<span>...</span><a href="' + url.replace("{PageCurrent}", totalpage) + '">' + totalpage + '</a>';
    }
    if (PageCurrent < totalpage) {
        page += '<a href="' + url.replace("{PageCurrent}", PageCurrent + 1) + '">></a>';
    }
    page += "</div>";
    return page;
}

//2018.09.10
$(document).on("click", "a[html]", function (e) {
    e.preventDefault();
    var $this = $(this);
    if ($this.hasClass("disable"))
        return;
    var html = $this.attr("html");
    $.get(html, function (result) {
        $('.html').html(result);
    });
});